**Code for replication of main tables for paper ” Will You Still Love Me Tomorrow? Partisan Electoral Interventions, Foreign Policy Compliance, and Voting in the U.N.” November 2020

*Stata 16

**Table 1.1

**Model 1: H1-H2 US  successful interventions

 reg usdistance_neg ld_int_success_us   dem_dic_polity lninc  usally_c_atop  count   relativepower_us l. usdistance_neg, cluster(ccode)


**Model 2: H1-H2 Russian successful interventions
reg ussrdistance_neg  ld_int_sucess_rus  dem_dic_polity  lninc ussrally_c_atop  count relativepower_rus  l. ussrdistance_neg, cluster(ccode)


**Model 3: H1-H2 US & interaction with US foreign aid

reg usdistance_neg ld_int_success_us civaid_usint dem_dic_polity lninc  usally_c_atop  count  relativepower_us l. usdistance_neg aidciv96_dep, cluster(ccode)


**Model 4: H1-H2 US with control for US FIRCS 

reg usdistance_neg ld_int_success_us   dem_dic_polity lninc  usally_c_atop  count relativepower_us  l. usdistance_neg usfirc_noelect, cluster(ccode)

*Table 1.2

**Model 5:  H1-H2 US & interaction with Democracy measure

reg usdistance_neg ld_int_success_us  demusint dem_dic_polity lninc  usally_c_atop  count   relativepower_us l. usdistance_neg, cluster(ccode)


**Model 6: H1-H2 US & Joint IO Membership control

reg usdistance_neg ld_int_success_us   dem_dic_polity lninc  usally_c_atop  count  relativepower_us l. usdistance_neg igostrintv, cluster(ccode)


**Model 7: H3 US successful interventions by Covert/Overt

reg usdistance_neg ld_us_suc_overt ld_us_suc_covert dem_dic_polity lninc  usally_c_atop  count relativepower_us l. usdistance_neg, cluster(ccode)


** Model 8: H3 Russian successful interventions by Covert/Overt

 reg ussrdistance_neg  ld_rus_suc_overt ld_rus_suc_covert  dem_dic_polity  lninc ussrally_c_atop  count  relativepower_rus l. ussrdistance_neg, cluster(ccode)


**Model 9: H4 US failed electoral Interventions

reg usdistance_neg ld_int_success_us ld_int_failure_us  dem_dic_polity lninc  usally_c_atop  count  relativepower_us l. usdistance_neg, cluster(ccode)

**Model 10: H4 Russia failed electoral Interventions

reg ussrdistance_neg  ld_int_sucess_rus ld_int_failure_rus dem_dic_polity  lninc ussrally_c_atop  count  relativepower_rus l. ussrdistance_neg, cluster(ccode)



***table 2 matching
 ** Model 1: H1-H2 US  successful interventions in matching

reg usdistance_neg ld_int_success_us   dem_dic_polity lninc  usally_c_atop count  relativepower_us l. usdistance_neg [iweight= cem_weights_us], cluster(ccode)


** Model 2: H1-H2 Russian successful interventions in matching

reg ussrdistance_neg  ld_int_sucess_rus  dem_dic_polity  lninc ussrally_c_atop count relativepower_rus  l. ussrdistance_neg  [iweight= cem_weightsussr], cluster(ccode)


** Model 3:  H3 US successful interventions by Covert/Overt in matching

reg usdistance_neg ld_us_suc_overt ld_us_suc_covert dem_dic_polity lninc  usally_c_atop  count relativepower_us l. usdistance_neg [iweight= cem_weights_us], cluster(ccode)


** Model 4: H3 Russian successful interventions by Covert/Overt in matching

reg ussrdistance_neg  ld_rus_suc_overt ld_rus_suc_covert  dem_dic_polity  lninc ussrally_c_atop count relativepower_rus l. ussrdistance_neg [iweight= cem_weightsussr], cluster(ccode)


** Model 5: H4 US failed electoral Interventions in matching

reg usdistance_neg ld_int_success_us ld_int_failure_us   dem_dic_polity lninc  usally_c_atop count relativepower_us  l. usdistance_neg [iweight= cem_weights_us], cluster(ccode)


** H4 Russia failed electoral Interventions in matching

reg ussrdistance_neg  ld_int_sucess_rus ld_int_failure_rus dem_dic_polity  lninc ussrally_c_atop count  relativepower_rus l. ussrdistance_neg  [iweight= cem_weightsussr], cluster(ccode)
